<div class="divupdate">
    <div class="notice" style="display: none"></div>        
    <form id="menu_edit_form">
    <table>
        <thead>
        <th colspan="6">
            <h4>Menu</h4>
        </th>
        </thead>
        <tbody>
            <tr>
                <td><label for="name">Name</label></td>
                <td>
                    <input id="id" name="id" type="hidden" value="<?php echo (isset($this->data) ? $this->data['menuID'] : '');?>"/>
                    <input id="name" name="name" type="text" value="<?php echo (isset($this->data) ? $this->data['name'] : '');?>" placeholder="name"/>
                </td>
                <td><label for="link">Link</label></td>
                <td>
                    <input id="link" name="link" type="text" value="<?php echo (isset($this->data) ? $this->data['link'] : '');?>" placeholder="url"/>
                </td>
                    </tr>
                    <tr>
                        <td><label for="groupmenu">Group</label></td>
                        <td>
                            <select id="groupmenu" name="groupmenu" style="width: 100px">                                
                            <?php foreach ($this->groupmenu as $value) {
                                    echo $value;
                                } ?>
                            </select>
                        </td>
                        <td><label for="icon">Icon</label></td>
                        <td>
                            <input id="icon" name="icon" type="text" value="<?php echo (isset($this->data) ? $this->data['icon'] : '');?>" placeholder="icon class"/>
                        </td>
                    </tr>
                    <tr>
                        <td><label for="parentmenu">Parent Menu</label></td>
                        <td>
                            <select id="parentmenu" name="parentmenu" style="width: 100px">                                
                            <?php foreach ($this->parentmenu as $value) {
                                    echo $value;
                                } ?>
                            </select>
                        </td>
                    </tr>
        <tr>
            <td colspan="2">
                <button id="save-btn" class="green" onclick="Web.Do({formid: '#menu_edit_form', param: {type: 'save'}});"> Save </button> &nbsp; 
                <button id="cancel-btn" onclick="Web.Do({formid: '#menu_edit_form', param: {type: 'cancel'}});"> Cancel </button>
            </td>
        </tr>
        </tbody>
        <tfoot>

        </tfoot>
    </table>  
    </form>
    
    <script>
        Web.loadList();
    </script>
</div>

